
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<?php
		if(isset($_POST['color'])){
			$colors=$_POST['color'];
			if($colors=='red'){
				$ccolor='red';
			}else if($colors=='blue'){
				$ccolor='blue';
			}else if($colors=='yellow'){
				$ccolor='yellow';
			}else if($colors=='green'){
				$ccolor='green';
			}
		}
		?>
	<body>
		<div id="">
			<span style="color:<?php echo $ccolor;?>;">
				这里是要变色的字<br />
				这里是要变色的字<br />
				这里是要变色的字<br />
			</span>
			<form action="" method="post">
				<select name="color">
				<option value="bleak">黑色</option>
                <option value="red">红色</option>
                <option value="blue">蓝色</option>
                <option value="yellow">黄色</option>
                <option value="green">绿色</option>
                </select>
				<input type="submit" value="确定"/>
			</form>
		</div>
	</body>
	
</html>
